package xju.rjxy.shop.model.domain;

import java.util.Date;

public class CommunityPost {
    private int id;
    private int userId;
    private String title;
    private String content;
    private String images;
    private String videoUrl;
    private int flag;
    private int deleted;
    private Date createTime;
    private Date updateTime;
    private String username; // 用于关联查询显示用户名

    public CommunityPost() {}

    public CommunityPost(int userId, String title, String content, String images, String videoUrl) {
        this.userId = userId;
        this.title = title;
        this.content = content;
        this.images = images;
        this.videoUrl = videoUrl;
        this.flag = 2;
        this.deleted = 0;
        this.createTime = new Date();
        this.updateTime = new Date();
    }

    // Getters and Setters
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getImages() {
        return images;
    }

    public void setImages(String images) {
        this.images = images;
    }

    public String getVideoUrl() {
        return videoUrl;
    }

    public void setVideoUrl(String videoUrl) {
        this.videoUrl = videoUrl;
    }

    public int getFlag() {
        return flag;
    }

    public void setFlag(int flag) {
        this.flag = flag;
    }

    public int getDeleted() {
        return deleted;
    }

    public void setDeleted(int deleted) {
        this.deleted = deleted;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }
} 